#define _CRT_SECURE_NO_WARNINGS 1
#include "RBTree.hpp"
namespace lnb
{
	template<class K>
	class set
	{
	public:
		struct KeyOfValue
		{
			const K& operator()(const K& k)
			{
				return k;
			}
		};

	public:
		typedef lnb::RBTree< K, K, KeyOfValue> RBTree;

		typedef typename RBTree::const_iterator iterator;
		typedef typename RBTree::const_iterator const_iterator;
		pair<iterator, bool>Insert(const K& k)
		{
			return _tree.Insert(k);
		}
		auto begin()
		{
			return _tree.begin();
		}
		auto end()
		{
			return _tree.end();
		}
	private:
		RBTree _tree;
	};
	void SetTest()
{
		lnb::set<int> s;
	s.Insert(2);
	s.Insert(5);
	s.Insert(1);
	s.Insert(9);
	s.Insert(4);
	s.Insert(2);
	auto it = s.begin();
	while (it != s.end())
	{
		cout << *it << " ";
		++it;
	}
}
}